using Microsoft.Extensions.DependencyInjection;

// public static class ServiceCollectionExtensions
// {
public static IServiceCollection RegisterKernels(this IServiceCollection service)
{
    var aiOptions = AiSettings.LoadAiProvidersFromFile();

    foreach (var aiProvider in aiOptions.Providers)
    {
        var providerRegister = AiProviderRegisterFactory.Create(aiProvider.AiType);
        providerRegister.Register(service, aiProvider);
    }

    return service;

}
// }